package com.shangguan.springboot.service.impl;

import com.shangguan.springboot.dao.TRoleMapper;
import com.shangguan.springboot.entity.TRole;
import com.shangguan.springboot.service.TRoleService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class TRoleServiceImpl implements TRoleService{

    @Resource
    private TRoleMapper tRoleMapper;

    @Override
    public int deleteByPrimaryKey(Integer roleId) {
        return tRoleMapper.deleteByPrimaryKey(roleId);
    }

    @Override
    public int insert(TRole record) {
        return tRoleMapper.insert(record);
    }

    @Override
    public int insertSelective(TRole record) {
        return tRoleMapper.insertSelective(record);
    }

    @Override
    public TRole selectByPrimaryKey(Integer roleId) {
        return tRoleMapper.selectByPrimaryKey(roleId);
    }

    @Override
    public int updateByPrimaryKeySelective(TRole record) {
        return tRoleMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(TRole record) {
        return tRoleMapper.updateByPrimaryKey(record);
    }

    @Override
    public List<TRole> selectRoleByTuserName(String userName) {
        return tRoleMapper.selectRoleByTuserName(userName);
    }

}
